package com.delta.rafg.coredata;

/**
 * Copyright [2010] Delta Air Lines, Inc. All Rights Reserved Access,
 * Modification, or Use Prohibited Without Express Permission of Delta Air
 * Lines.
 */
import java.io.Serializable;


/**
 * AObject.
 *
 * @author Delta
 * @version 1.0
 */
public abstract class AObject implements Serializable {

    /**
     * Holds the value of serialVersionUID property.
     */
    private static final long serialVersionUID = 1L;

    /**
     * Holds the value of aObj property types of AObjectHelper.
     */
    protected static  AObjectHelper aObj;

    /**
     * This method is the access method for the <code>aObj</code> property,
     * which is of type <code>AObjectHelper</code>.
     * @return the current value of the <code>aObj</code>
     * property.
     */
    public static AObjectHelper getaObj() {

        return AObject.aObj;
    }

    /**
     * This method sets the value of the <code>aObj</code> property,
     * which is of type <code>AObjectHelper</code>.
     * @param aObj - the new value of <code>aObj</code> property.
     */
    public static void setaObj(AObjectHelper aObj) {

        AObject.aObj = aObj;
    }

    @Override
    public String toString() {

        return this.toXML();
    }

    /**
     * This method is used for convert AObject object to String value.
     * @return String value
     */
    public final String toXML() {

        return toXML(this);
    }

    /**
     * This method is used for convert Object to String value.
     * @param pObject
     * @return String value
     */
    public final String toXML(final Object pObject) {

        if (aObj != null) { return aObj.getInstance().toXML(pObject); }
        return "";
    }
}
